<template>
	<view class="flex justify-center item-center" style="padding: ;">
		<view class="bg-white rounded-xl" :class="mode=='pc'?'max-w-1200 p-8 mt-6':'p-4'" :style="{width: mode=='pc'?'':'750rpx', overflow: 'auto'}">
			<rich-text :nodes="info.articleContent"></rich-text>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapActions
	} from 'vuex'
	export default {
		data() {
			return {
				id:'',
				info:''
			}
		},
		computed: {
			...mapState({
				mode:state=>state.app.mode
			})
		},
		onLoad(op) {
			console.log(op);
			this.id = op.id
			if(op.info){
				let info={
					articleContent:''
				}
				this.info = info
			}else{
				this.articleInfo()
			}
			
			
		},
		methods: {
			// 获取信息
			articleInfo(){
				uni.$http.get(`/wap/saasUser/articleInfo/${this.id}`,{}).then(res => {
					if (res.code == 200&&res.data) {
						this.info = res.data
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	
</style>